
import sys
sys.path.append('C:\\Documents and Settings\\miriamf\\My Documents\\Snuppi\\snuppi')

import unittest

import imageMatcher
reload(imageMatcher)


class testImageMatcher(unittest.TestCase):

    def testCreateUnitsAverage(self):
        pixels = [(1,1,1),(1,1,1),(1,1,1),\
                  (2,2,2),(2,2,2),(2,2,2),(3,3,3),(3,3,3),(3,3,3)]
        numberOfPixelsPerUnit = 3
        averages = imageMatcher.createUnitsAverages(pixels,numberOfPixelsPerUnit)
        assert averages[0] == (1,1,1)
        assert averages[1] == (2,2,2)
        assert averages[2] == (3,3,3)


if __name__ == "__main__":
    unittest.main()